|
![](/i/fill.gif) |
Gosh.
I wanted this feature for years and never realised (till now) that is was
there from the beginning. The problem : to achieve what some real-world
cameras can do : displace the film from its
central-and-parrallel-to-the-lens typical position. Solution : using non
perpendicular camera vectors. Thanks to MR for his "vanishing point??"
question in p.newuser that made me think (at last).
So, what are the practical implications ?
A typical problem : a scene with an "horizontal camera", that is camera
location.y and look_at.y are identical. The horizon is in the middle of the
image. If you want it somewhere else, you have to change the camera - which
you might not want to -, or render a bigger image and crop it in a drawing
software (partial render helps). OR use non orthogonal camera vectors ;-)
Another use : render a tall building as seen from sidewalk height without
having a vertical vanishing point.
Camera code for the example :
----
// Do not forget to switch vista buffers off (-uv) or it won't work.
#include "transforms.inc"
camera{
#declare Cam_location=<0,.25,-1.5>;
#declare Cam_Horizontal_look_at=<0,.25,0>;
#declare Cam_Real_look_at=<0,1.125,0>;
location 0
direction .4*z
#switch (clock)
#case(0) // horizontal cam
look_at Cam_Horizontal_look_at-Cam_location
#break
#case(1) // usual rotated cam, vertical vanishing point
look_at Cam_Real_look_at-Cam_location
#break
#case(2) // sheared cam
look_at Cam_Horizontal_look_at-Cam_location
Shear_Trans(x, y, z+Cam_Real_look_at-Cam_Horizontal_look_at)
#break
#end
translate Cam_location
}
---
Povingly,
Philippe
Post a reply to this message
Attachments:
Download 'ShearedCam2.png' (37 KB)
Download 'ShearedCam3.png' (35 KB)
Download 'ShearedCam1.png' (39 KB)
Preview of image 'ShearedCam2.png'
![ShearedCam2.png](/povray.binaries.images/attachment/%3C3bf590a1%40news.povray.org%3E/ShearedCam2.png?preview=1)
Preview of image 'ShearedCam3.png'
![ShearedCam3.png](/povray.binaries.images/attachment/%3C3bf590a1%40news.povray.org%3E/ShearedCam3.png?preview=1)
Preview of image 'ShearedCam1.png'
![ShearedCam1.png](/povray.binaries.images/attachment/%3C3bf590a1%40news.povray.org%3E/ShearedCam1.png?preview=1)
|
![](/i/fill.gif) |